﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MovieRental.SqlRepositoryLibrary.Configuration
{
    public class SqlRepositoryConfiguration : ConfigurationSection
    {
        [ConfigurationProperty("connection", IsRequired = true)]
        public ConnectionConfigurationElement Connection
        {
            get { return (ConnectionConfigurationElement)base["connection"]; }
            set { base["connection"] = value; }
        }

        [ConfigurationProperty("mode", IsRequired = false)]
        public InitializationMode Mode
        {
            get { return (InitializationMode)base["mode"]; }
            set { base["mode"] = value; }
        }

        [ConfigurationProperty("creationScript", IsRequired = false)]
        public string DbCreationFileName
        {
            get { return (string)base["creationScript"]; }
            set { base["creationScript"] = value; }
        }
    }
}
